home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / CIncludes / OCEMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  48.2 KB  |  1,661 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEMail.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OCEMAIL__
  21. #define __OCEMAIL__
  22.  
  23.  
  24. #ifndef __APPLEEVENTS__
  25. #include <AppleEvents.h>
  26. #endif
  27. /*    #include <Errors.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <Types.h>                                            */
  30. /*    #include <Memory.h>                                            */
  31. /*        #include <MixedMode.h>                                    */
  32. /*    #include <OSUtils.h>                                        */
  33. /*    #include <Events.h>                                            */
  34. /*        #include <Quickdraw.h>                                    */
  35. /*            #include <QuickdrawText.h>                            */
  36. /*    #include <EPPC.h>                                            */
  37. /*        #include <AppleTalk.h>                                    */
  38. /*        #include <Files.h>                                        */
  39. /*        #include <PPCToolbox.h>                                    */
  40. /*        #include <Processes.h>                                    */
  41. /*    #include <Notification.h>                                    */
  42.  
  43. #ifndef __FILES__
  44. #include <Files.h>
  45. #endif
  46.  
  47. #ifndef __MEMORY__
  48. #include <Memory.h>
  49. #endif
  50.  
  51. #ifndef __TEXTEDIT__
  52. #include <TextEdit.h>
  53. #endif
  54.  
  55. #ifndef __TYPES__
  56. #include <Types.h>
  57. #endif
  58.  
  59. #ifndef __DIGITALSIGNATURE__
  60. #include <DigitalSignature.h>
  61. #endif
  62.  
  63. #ifndef __OCE__
  64. #include <OCE.h>
  65. #endif
  66. /*    #include <Aliases.h>                                        */
  67. /*    #include <Script.h>                                            */
  68. /*        #include <IntlResources.h>                                */
  69.  
  70. #ifndef __OCEAUTHDIR__
  71. #include <OCEAuthDir.h>
  72. #endif
  73.  
  74. #ifndef __OCEMESSAGING__
  75. #include <OCEMessaging.h>
  76. #endif
  77.  
  78. #ifdef __cplusplus
  79. extern "C" {
  80. #endif
  81.  
  82. #if PRAGMA_ALIGN_SUPPORTED
  83. #pragma options align=mac68k
  84. #endif
  85.  
  86. #if PRAGMA_IMPORT_SUPPORTED
  87. #pragma import on
  88. #endif
  89.  
  90. typedef union MSAMParam MSAMParam;
  91.  
  92. typedef pascal void (*MSAMIOCompletionProcPtr)(MSAMParam *paramBlock);
  93.  
  94. #if GENERATINGCFM
  95. typedef UniversalProcPtr MSAMIOCompletionUPP;
  96. #else
  97. typedef MSAMIOCompletionProcPtr MSAMIOCompletionUPP;
  98. #endif
  99.  
  100. #define MailParamBlockHeader     \
  101.     Ptr    qLink;                        \
  102.     long    reservedH1;                \
  103.     long    reservedH2;                \
  104.     MSAMIOCompletionUPP    ioCompletion;     \
  105.     OSErr    ioResult;                \
  106.     long    saveA5;                    \
  107.     short    reqCode;
  108. typedef long MailMsgRef;
  109.  
  110. /* reference to an open msam queue */
  111. typedef long MSAMQueueRef;
  112.  
  113. /* identifies slots managed by a PMSAM */
  114. typedef unsigned short MSAMSlotID;
  115.  
  116. /* reference to an active mailbox */
  117. typedef long MailboxRef;
  118.  
  119. /* identifies slots within a mailbox */
  120. typedef unsigned short MailSlotID;
  121.  
  122. /* identifies a letter in a mailbox */
  123. struct MailSeqNum {
  124.     MailSlotID                        slotID;
  125.     long                            seqNum;
  126. };
  127.  
  128. typedef struct MailSeqNum MailSeqNum;
  129.  
  130. /* A MailBuffer is used to describe a buffer used for an IO operation.
  131. The location of the buffer is pointed to by 'buffer'. 
  132. When reading, the size of the buffer is 'bufferSize' 
  133. and the size of data actually read is 'dataSize'.
  134. When writing, the size of data to be written is 'bufferSize' 
  135. and the size of data actually written is 'dataSize'.
  136. */
  137. struct MailBuffer {
  138.     long                            bufferSize;
  139.     Ptr                                buffer;
  140.     long                            dataSize;
  141. };
  142.  
  143. typedef struct MailBuffer MailBuffer;
  144.  
  145. /* A MailReply is used to describe a commonly used reply buffer format.
  146. It contains a count of tuples followed by an array of tuples.
  147. The format of the tuple itself depends on each particular call.
  148. */
  149. struct MailReply {
  150.     unsigned short                    tupleCount;
  151. /* tuple[tupleCount] */
  152. };
  153.  
  154. typedef struct MailReply MailReply;
  155.  
  156. /* Shared Memory Communication Area used when Mail Manager sends 
  157. High Level Events to a PMSAM. 
  158. */
  159. struct SMCA {
  160.     unsigned short                    smcaLength;                    /* includes size of smcaLength field */
  161.     OSErr                            result;
  162.     long                            userBytes;
  163.     union {
  164.         CreationID                        slotCID;                /* for create/modify/delete slot calls */
  165.         long                            msgHint;                /* for kMailEPPCMsgOpened */
  166.     } u;
  167. };
  168.  
  169. typedef struct SMCA SMCA;
  170.  
  171. /**************************************************************************************/
  172. /* Value of creator and types fields for messages and blocks defined by MailManager */
  173.  
  174. enum {
  175.     kMailAppleMailCreator        = 'apml',                        /* message and letter block creator */
  176.     kMailLtrMsgType                = 'lttr',                        /* message type of letters, reports */
  177.     kMailLtrHdrType                = 'lthd',                        /* contains letter header */
  178.     kMailContentType            = 'body',                        /* contains content of letter */
  179.     kMailEnclosureListType        = 'elst',                        /* contains list of enclosures */
  180.     kMailEnclosureDesktopType    = 'edsk',                        /* contains desktop mgr info for enclosures */
  181.     kMailEnclosureFileType        = 'asgl',                        /* contains a file enclosure */
  182. /* format is defined by AppleSingle */
  183.     kMailImageBodyType            = 'imag',                        /* contains image of letter */
  184. /*        format is struct TPfPgDir - in Printing.h
  185.     *    struct TPfPgDir {
  186.     *        short    pageCount;        - number of pages in the image.
  187.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  188.     *                                - to image of page n.
  189.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  190. */
  191.     kMailMSAMType                = 'gwyi',                        /* contains msam specific information */
  192.     kMailTunnelLtrType            = 'tunl',                        /* used to read a tunnelled message */
  193.     kMailHopInfoType            = 'hopi',                        /* used to read hopInfo for a tunnelled message */
  194.     kMailReportType                = 'rpti',                        /* contains report info */
  195. /*
  196. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  197. This block has a header, IPMReportBlockHeader,
  198. followed by an array of elements, each of type IPMRecipientReport
  199.  
  200. Various families used by mail or related msgs
  201. */
  202.     kMailFamily                    = 'mail',                        /* Defines family of "mail" msgs: content, header, etc */
  203.     kMailFamilyFile                = 'file'
  204. };
  205.  
  206. /**************************************************************************************/
  207. typedef unsigned short MailAttributeID;
  208.  
  209. /* Values of MailAttributeID */
  210. /* Message store attributes - stored in the catalog */
  211. /* Will always be present in a letter and have fixed sizes */
  212.  
  213. enum {
  214.     kMailLetterFlagsBit            = 1,                            /* MailLetterFlags */
  215. /* Letter attributes - stored in the letter 
  216.    Will always be present in a letter and have fixed sizes */
  217.     kMailIndicationsBit            = 3,                            /* MailIndications */
  218.     kMailMsgTypeBit                = 4,                            /* OCECreatorType */
  219.     kMailLetterIDBit            = 5,                            /* MailLetterID */
  220.     kMailSendTimeStampBit        = 6,                            /* MailTime */
  221.     kMailNestingLevelBit        = 7,                            /* MailNestingLevel */
  222.     kMailMsgFamilyBit            = 8,                            /* OSType */
  223. /* Letter attributes - stored in the letter
  224.    May be present in a letter and have fixed sizes */
  225.     kMailReplyIDBit                = 9,                            /* MailLetterID */
  226.     kMailConversationIDBit        = 10,                            /* MailLetterID */
  227. /* Letter attributes - stored in the letter
  228.    May be present in a letter and have variable length sizes */
  229.     kMailSubjectBit                = 11,                            /* RString */
  230.     kMailFromBit                = 12,                            /* MailRecipient */
  231.     kMailToBit                    = 13,                            /* MailRecipient */
  232.     kMailCcBit                    = 14,                            /* MailRecipient */
  233.     kMailBccBit                    = 15                            /* MailRecipient */
  234. };
  235.  
  236. typedef unsigned long MailAttributeMask;
  237.  
  238. /* Values of MailAttributeMask */
  239.  
  240. enum {
  241.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  242.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  243.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  244.     kMailLetterIDMask            = 1L << (kMailLetterIDBit - 1),
  245.     kMailSendTimeStampMask        = 1L << (kMailSendTimeStampBit - 1),
  246.     kMailNestingLevelMask        = 1L << (kMailNestingLevelBit - 1),
  247.     kMailMsgFamilyMask            = 1L << (kMailMsgFamilyBit - 1),
  248.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  249.     kMailConversationIDMask        = 1L << (kMailConversationIDBit - 1),
  250.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  251.     kMailFromMask                = 1L << (kMailFromBit - 1),
  252.     kMailToMask                    = 1L << (kMailToBit - 1),
  253.     kMailCcMask                    = 1L << (kMailCcBit - 1),
  254.     kMailBccMask                = 1L << (kMailBccBit - 1)
  255. };
  256.  
  257. typedef unsigned long MailAttributeBitmap;
  258.  
  259. /**************************************************************************************/
  260. typedef unsigned short MailLetterSystemFlags;
  261.  
  262. /* Values of MailLetterSystemFlags */
  263. /* letter is available locally (either by nature or via cache) */
  264.  
  265. enum {
  266.     kMailIsLocalBit                = 2
  267. };
  268.  
  269. enum {
  270.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  271. };
  272.  
  273. typedef unsigned short MailLetterUserFlags;
  274.  
  275.  
  276. enum {
  277.     kMailReadBit,                                                /* this letter has been opened */
  278.     kMailDontArchiveBit,                                        /* this letter is not */
  279. /* to be archived either because 
  280.                                            it has already been archived or 
  281.                                            it should not be archived. */
  282.     kMailInTrashBit                                                /* this letter is in trash */
  283. };
  284.  
  285. /* Values of MailLetterUserFlags */
  286. enum {
  287.     kMailReadMask                = 1L << kMailReadBit,
  288.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  289.     kMailInTrashMask            = 1L << kMailInTrashBit
  290. };
  291.  
  292. struct MailLetterFlags {
  293.     MailLetterSystemFlags            sysFlags;
  294.     MailLetterUserFlags                userFlags;
  295. };
  296.  
  297. typedef struct MailLetterFlags MailLetterFlags;
  298.  
  299. struct MailMaskedLetterFlags {
  300.     MailLetterFlags                    flagMask;                    /* flags that are to be set */
  301.     MailLetterFlags                    flagValues;                    /* and their values */
  302. };
  303.  
  304. typedef struct MailMaskedLetterFlags MailMaskedLetterFlags;
  305.  
  306.  
  307. enum {
  308.     kMailOriginalInReportBit    = 1,
  309.     kMailNonReceiptReportsBit    = 3,
  310.     kMailReceiptReportsBit        = 4,
  311.     kMailForwardedBit            = 5,
  312.     kMailPriorityBit            = 6,
  313.     kMailIsReportWithOriginalBit = 8,
  314.     kMailIsReportBit            = 9,
  315.     kMailHasContentBit            = 10,
  316.     kMailHasSignatureBit        = 11,
  317.     kMailAuthenticatedBit        = 12,
  318.     kMailSentBit                = 13
  319. };
  320.  
  321. /* Values of MailIndications */
  322. enum {
  323.     kMailSentMask                = 1L << (kMailSentBit - 1),
  324.     kMailAuthenticatedMask        = 1L << (kMailAuthenticatedBit - 1),
  325.     kMailHasSignatureMask        = 1L << (kMailHasSignatureBit - 1),
  326.     kMailHasContentMask            = 1L << (kMailHasContentBit - 1),
  327.     kMailIsReportMask            = 1L << (kMailIsReportBit - 1),
  328.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  329.     kMailPriorityMask            = 3L << (kMailPriorityBit - 1),
  330.     kMailForwardedMask            = 1L << (kMailForwardedBit - 1),
  331.     kMailReceiptReportsMask        = 1L << (kMailReceiptReportsBit - 1),
  332.     kMailNonReceiptReportsMask    = 1L << (kMailNonReceiptReportsBit - 1),
  333.     kMailOriginalInReportMask    = 3L << (kMailOriginalInReportBit - 1)
  334. };
  335.  
  336. typedef unsigned long MailIndications;
  337.  
  338. /* values of the field originalInReport in MailIndications */
  339.  
  340. enum {
  341.     kMailNoOriginal                = 0,                            /* do not enclose original in reports */
  342.     kMailEncloseOnNonReceipt    = 3                                /* enclose original in non-delivery reports */
  343. };
  344.  
  345. typedef IPMMsgID MailLetterID;
  346.  
  347. struct MailTime {
  348.     UTCTime                            time;                        /* current UTC(GMT) time */
  349.     UTCOffset                        offset;                        /* offset from GMT */
  350. };
  351.  
  352. typedef struct MailTime MailTime;
  353.  
  354. /* innermost letter has nestingLevel 0 */
  355. typedef unsigned short MailNestingLevel;
  356.  
  357. typedef OCERecipient MailRecipient;
  358.  
  359. /**************************************************************************************/
  360.  
  361. enum {
  362.     kMailTextSegmentBit,
  363.     kMailPictSegmentBit,
  364.     kMailSoundSegmentBit,
  365.     kMailStyledTextSegmentBit,
  366.     kMailMovieSegmentBit
  367. };
  368.  
  369. typedef unsigned short MailSegmentMask;
  370.  
  371. /* Values of MailSegmentMask */
  372.  
  373. enum {
  374.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  375.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  376.     kMailSoundSegmentMask        = 1L << kMailSoundSegmentBit,
  377.     kMailStyledTextSegmentMask    = 1L << kMailStyledTextSegmentBit,
  378.     kMailMovieSegmentMask        = 1L << kMailMovieSegmentBit
  379. };
  380.  
  381. typedef unsigned short MailSegmentType;
  382.  
  383. /* Values of MailSegmentType */
  384.  
  385. enum {
  386.     kMailInvalidSegmentType        = 0,
  387.     kMailTextSegmentType        = 1,
  388.     kMailPictSegmentType        = 2,
  389.     kMailSoundSegmentType        = 3,
  390.     kMailStyledTextSegmentType    = 4,
  391.     kMailMovieSegmentType        = 5
  392. };
  393.  
  394. /**************************************************************************************/
  395. enum {
  396.     kMailErrorLogEntryVersion    = 0x101,
  397.     kMailMSAMErrorStringListID    = 128,                            /* These 'STR#' resources should be */
  398.     kMailMSAMActionStringListID    = 129                            /* in the PMSAM resource fork */
  399. };
  400.  
  401. typedef unsigned short MailLogErrorType;
  402.  
  403. /* Values of MailLogErrorType */
  404.  
  405. enum {
  406.     kMailELECorrectable            = 0,
  407.     kMailELEError                = 1,
  408.     kMailELEWarning                = 2,
  409.     kMailELEInformational        = 3
  410. };
  411.  
  412. typedef short MailLogErrorCode;
  413.  
  414. /* Values of MailLogErrorCode */
  415.  
  416. enum {
  417.     kMailMSAMErrorCode            = 0,                            /* positive codes are indices into
  418.                                                    PMSAM defined strings */
  419.     kMailMiscError                = -1,                            /* negative codes are OCE defined */
  420.     kMailNoModem                = -2                            /* modem required, but missing */
  421. };
  422.  
  423. struct MailErrorLogEntryInfo {
  424.     short                            version;
  425.     UTCTime                            timeOccurred;                /* do not fill in */
  426.     Str31                            reportingPMSAM;                /* do not fill in */
  427.     Str31                            reportingMSAMSlot;            /* do not fill in */
  428.     MailLogErrorType                errorType;
  429.     MailLogErrorCode                errorCode;
  430.     short                            errorResource;                /* resources are valid if */
  431.     short                            actionResource;                /* errorCode = kMailMSAMErrorCode
  432.                                                    index starts from 1 */
  433.     unsigned long                    filler;
  434.     unsigned short                    filler2;
  435. };
  436.  
  437. typedef struct MailErrorLogEntryInfo MailErrorLogEntryInfo;
  438.  
  439. /**************************************************************************************/
  440. typedef short MailBlockMode;
  441.  
  442. /* Values of MailBlockMode */
  443.  
  444. enum {
  445.     kMailFromStart                = 1,                            /* write data from offset calculated from */
  446.     kMailFromLEOB                = 2,                            /* start of block, end of block, */
  447.     kMailFromMark                = 3                                /* or from the current mark */
  448. };
  449.  
  450. struct MailEnclosureInfo {
  451.     StringPtr                        enclosureName;
  452.     CInfoPBPtr                        catInfo;
  453.     StringPtr                        comment;
  454.     Ptr                                icon;
  455. };
  456.  
  457. typedef struct MailEnclosureInfo MailEnclosureInfo;
  458.  
  459. /**************************************************************************************/
  460.  
  461. enum {
  462.     kOCESetupLocationNone        = 0,                            /* disconnect state */
  463.     kOCESetupLocationMax        = 8                                /* maximum location value */
  464. };
  465.  
  466. typedef char OCESetupLocation;
  467.  
  468. /* location state is a bitmask, 0x1=>1st location active, 
  469.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  470.  */
  471. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  472. typedef unsigned char MailLocationFlags;
  473.  
  474. struct MailLocationInfo {
  475.     OCESetupLocation                location;
  476.     MailLocationFlags                active;
  477. };
  478.  
  479. typedef struct MailLocationInfo MailLocationInfo;
  480.  
  481. /**************************************************************************************/
  482. /* Definitions for Personal MSAMs */
  483. /**************************************************************************************/
  484.  
  485. enum {
  486.     kMailEPPCMsgVersion            = 3
  487. };
  488.  
  489. struct MailEPPCMsg {
  490.     short                            version;
  491.     union {
  492.         SMCA                            *theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  493.         long                            sequenceNumber;            /* for 'inqu', 'dlom' */
  494.         MailLocationInfo                locationInfo;            /* for 'locc' */
  495.     } u;
  496. };
  497.  
  498. typedef struct MailEPPCMsg MailEPPCMsg;
  499.  
  500. /* Values of OCE defined High Level Event message classes */
  501.  
  502. enum {
  503.     kMailEPPCCreateSlot            = 'crsl',
  504.     kMailEPPCModifySlot            = 'mdsl',
  505.     kMailEPPCDeleteSlot            = 'dlsl',
  506.     kMailEPPCShutDown            = 'quit',
  507.     kMailEPPCMailboxOpened        = 'mbop',
  508.     kMailEPPCMailboxClosed        = 'mbcl',
  509.     kMailEPPCMsgPending            = 'msgp',
  510.     kMailEPPCSendImmediate        = 'sndi',
  511.     kMailEPPCContinue            = 'cont',
  512.     kMailEPPCSchedule            = 'sked',
  513.     kMailEPPCAdmin                = 'admn',
  514.     kMailEPPCInQUpdate            = 'inqu',
  515.     kMailEPPCMsgOpened            = 'msgo',
  516.     kMailEPPCDeleteOutQMsg        = 'dlom',
  517.     kMailEPPCWakeup                = 'wkup',
  518.     kMailEPPCLocationChanged    = 'locc'
  519. };
  520.  
  521. union MailTimer {
  522.     long                            frequency;                    /* how often to connect */
  523.     long                            connectTime;                /* time since midnight */
  524. };
  525. typedef union MailTimer MailTimer;
  526.  
  527.  
  528. enum {
  529.     kMailTimerOff                = 0,                            /* control is off */
  530.     kMailTimerTime                = 1,                            /* specifies connect time (relative to midnight) */
  531.     kMailTimerFrequency            = 2                                /* specifies connect frequency */
  532. };
  533.  
  534. typedef Byte MailTimerKind;
  535.  
  536. struct MailTimers {
  537.     MailTimerKind                    sendTimeKind;                /* either kMailTimerTime or kMailTimerFrequency */
  538.     MailTimerKind                    receiveTimeKind;            /* either kMailTimerTime or kMailTimerFrequency */
  539.     MailTimer                        send;
  540.     MailTimer                        receive;
  541. };
  542.  
  543. typedef struct MailTimers MailTimers;
  544.  
  545. struct MailStandardSlotInfoAttribute {
  546.     short                            version;
  547.     MailLocationFlags                active;                        /* active if MailLocationMask(i) is set */
  548.     Byte                            padByte;
  549.     MailTimers                        sendReceiveTimer;
  550. };
  551.  
  552. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  553.  
  554. struct PMSAMGetMSAMRecordPB {
  555.     Ptr                                qLink;
  556.     long                            reservedH1;
  557.     long                            reservedH2;
  558.     MSAMIOCompletionUPP                ioCompletion;
  559.     OSErr                            ioResult;
  560.     long                            saveA5;
  561.     short                            reqCode;
  562.     CreationID                        msamCID;
  563. };
  564.  
  565. typedef struct PMSAMGetMSAMRecordPB PMSAMGetMSAMRecordPB;
  566.  
  567. struct PMSAMOpenQueuesPB {
  568.     Ptr                                qLink;
  569.     long                            reservedH1;
  570.     long                            reservedH2;
  571.     MSAMIOCompletionUPP                ioCompletion;
  572.     OSErr                            ioResult;
  573.     long                            saveA5;
  574.     short                            reqCode;
  575.     MSAMQueueRef                    inQueueRef;
  576.     MSAMQueueRef                    outQueueRef;
  577.     MSAMSlotID                        msamSlotID;
  578.     long                            filler[2];
  579. };
  580.  
  581. typedef struct PMSAMOpenQueuesPB PMSAMOpenQueuesPB;
  582.  
  583. typedef unsigned short PMSAMStatus;
  584.  
  585. /* Values of PMSAMStatus */
  586.  
  587. enum {
  588.     kPMSAMStatusPending            = 1,                            /* for inQueue and outQueue */
  589.     kPMSAMStatusError            = 2,                            /* for inQueue and outQueue */
  590.     kPMSAMStatusSending            = 3,                            /* for outQueue only */
  591.     kPMSAMStatusCaching            = 4,                            /* for inQueue only */
  592.     kPMSAMStatusSent            = 5                                /* for outQueue only */
  593. };
  594.  
  595. struct PMSAMSetStatusPB {
  596.     Ptr                                qLink;
  597.     long                            reservedH1;
  598.     long                            reservedH2;
  599.     MSAMIOCompletionUPP                ioCompletion;
  600.     OSErr                            ioResult;
  601.     long                            saveA5;
  602.     short                            reqCode;
  603.     MSAMQueueRef                    queueRef;
  604.     long                            seqNum;
  605.     long                            msgHint;                    /* for posting cache error,set this to 0 when report outq status */
  606.     PMSAMStatus                        status;
  607. };
  608.  
  609. typedef struct PMSAMSetStatusPB PMSAMSetStatusPB;
  610.  
  611. struct PMSAMLogErrorPB {
  612.     Ptr                                qLink;
  613.     long                            reservedH1;
  614.     long                            reservedH2;
  615.     MSAMIOCompletionUPP                ioCompletion;
  616.     OSErr                            ioResult;
  617.     long                            saveA5;
  618.     short                            reqCode;
  619.     MSAMSlotID                        msamSlotID;                    /* 0 for PMSAM errors */
  620.     MailErrorLogEntryInfo            *logEntry;
  621.     long                            filler[2];
  622. };
  623.  
  624. typedef struct PMSAMLogErrorPB PMSAMLogErrorPB;
  625.  
  626. /****************************************************************************************/
  627.  
  628. enum {
  629.     kMailMsgSummaryVersion        = 1
  630. };
  631.  
  632. struct MailMasterData {
  633.     MailAttributeBitmap                attrMask;                    /* indicates attributes present in MsgSummary */
  634.     MailLetterID                    messageID;
  635.     MailLetterID                    replyID;
  636.     MailLetterID                    conversationID;
  637. };
  638.  
  639. typedef struct MailMasterData MailMasterData;
  640.  
  641. /* Values for addressedToMe in struct MailCoreData */
  642.  
  643. enum {
  644.     kAddressedAs_TO                = 0x1,
  645.     kAddressedAs_CC                = 0x2,
  646.     kAddressedAs_BCC            = 0x4
  647. };
  648.  
  649. struct MailCoreData {
  650.     MailLetterFlags                    letterFlags;
  651.     unsigned long                    messageSize;
  652.     MailIndications                    letterIndications;
  653.     OCECreatorType                    messageType;
  654.     MailTime                        sendTime;
  655.     OSType                            messageFamily;
  656.     unsigned char                    reserved;
  657.     unsigned char                    addressedToMe;
  658.     char                            agentInfo[6];                /* 6 bytes of special info [set to zero]
  659.     * these are variable length and even padded */
  660.     RString32                        sender;                        /* recipient's entityName (trunc)*/
  661.     RString32                        subject;                    /* subject maybe truncated */
  662. };
  663.  
  664. typedef struct MailCoreData MailCoreData;
  665.  
  666. struct MSAMMsgSummary {
  667.     short                            version;                    /* following flags are defaulted by Toolbox */
  668.     Boolean                            msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  669.     Boolean                            msgUpdated;                    /* true if msgSummary was updated by MailManager */
  670.     Boolean                            msgCached;                    /* true if msg is in the slot's InQueue */
  671.     Byte                            padByte;
  672.     MailMasterData                    masterData;
  673.     MailCoreData                    coreData;
  674. };
  675.  
  676. typedef struct MSAMMsgSummary MSAMMsgSummary;
  677.  
  678. /* PMSAM can put up to 128 bytes of private msg summary data */
  679.  
  680. enum {
  681.     kMailMaxPMSAMMsgSummaryData    = 128
  682. };
  683.  
  684. struct PMSAMCreateMsgSummaryPB {
  685.     Ptr                                qLink;
  686.     long                            reservedH1;
  687.     long                            reservedH2;
  688.     MSAMIOCompletionUPP                ioCompletion;
  689.     OSErr                            ioResult;
  690.     long                            saveA5;
  691.     short                            reqCode;
  692.     MSAMQueueRef                    inQueueRef;
  693.     long                            seqNum;                        /* <- seq of the new message */
  694.     MSAMMsgSummary                    *msgSummary;                /* attributes and mask filled in */
  695.     MailBuffer                        *buffer;                    /* PMSAM specific data to be appended */
  696. };
  697.  
  698. typedef struct PMSAMCreateMsgSummaryPB PMSAMCreateMsgSummaryPB;
  699.  
  700. struct PMSAMPutMsgSummaryPB {
  701.     Ptr                                qLink;
  702.     long                            reservedH1;
  703.     long                            reservedH2;
  704.     MSAMIOCompletionUPP                ioCompletion;
  705.     OSErr                            ioResult;
  706.     long                            saveA5;
  707.     short                            reqCode;
  708.     MSAMQueueRef                    inQueueRef;
  709.     long                            seqNum;
  710.     MailMaskedLetterFlags            *letterFlags;                /* if not nil, then set msgStoreFlags */
  711.     MailBuffer                        *buffer;                    /* PMSAM specific data to be overwritten */
  712. };
  713.  
  714. typedef struct PMSAMPutMsgSummaryPB PMSAMPutMsgSummaryPB;
  715.  
  716. struct PMSAMGetMsgSummaryPB {
  717.     Ptr                                qLink;
  718.     long                            reservedH1;
  719.     long                            reservedH2;
  720.     MSAMIOCompletionUPP                ioCompletion;
  721.     OSErr                            ioResult;
  722.     long                            saveA5;
  723.     short                            reqCode;
  724.     MSAMQueueRef                    inQueueRef;
  725.     long                            seqNum;
  726.     MSAMMsgSummary                    *msgSummary;                /* if not nil, then read in the msgSummary */
  727.     MailBuffer                        *buffer;                    /* PMSAM specific data to be read */
  728.     unsigned short                    msgSummaryOffset;            /* offset of PMSAM specific data
  729.                                                from start of MsgSummary */
  730. };
  731.  
  732. typedef struct PMSAMGetMsgSummaryPB PMSAMGetMsgSummaryPB;
  733.  
  734. /****************************************************************************************/
  735. /* Definitions for Server MSAMs */
  736. /**************************************************************************************/
  737. typedef unsigned short SMSAMAdminCode;
  738.  
  739. /* Values of SMSAMAdminCode */
  740.  
  741. enum {
  742.     kSMSAMNotifyFwdrSetupChange    = 1,
  743.     kSMSAMNotifyFwdrNameChange    = 2,
  744.     kSMSAMNotifyFwdrPwdChange    = 3,
  745.     kSMSAMGetDynamicFwdrParams    = 4
  746. };
  747.  
  748. typedef unsigned long SMSAMSlotChanges;
  749.  
  750.  
  751. enum {
  752.     kSMSAMFwdrHomeInternetChangedBit,
  753.     kSMSAMFwdrConnectedToChangedBit,
  754.     kSMSAMFwdrForeignRLIsChangedBit,
  755.     kSMSAMFwdrMnMServerChangedBit
  756. };
  757.  
  758. /* Values of SMSAMSlotChanges */
  759. enum {
  760.     kSMSAMFwdrEverythingChangedMask = -1,
  761.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  762.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  763.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  764.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  765. };
  766.  
  767. /* kSMSAMNotifyFwdrSetupChange */
  768. struct SMSAMSetupChange {
  769.     SMSAMSlotChanges                whatChanged;                /*  --> bitmap of what parameters changed */
  770.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  771. };
  772.  
  773. typedef struct SMSAMSetupChange SMSAMSetupChange;
  774.  
  775. /* kSMSAMNotifyFwdrNameChange */
  776. struct SMSAMNameChange {
  777.     RString                            newName;                    /*  --> msams new name */
  778.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  779. };
  780.  
  781. typedef struct SMSAMNameChange SMSAMNameChange;
  782.  
  783. /* kSMSAMNotifyFwdrPasswordChange */
  784. struct SMSAMPasswordChange {
  785.     RString                            newPassword;                /*  --> msams new password */
  786.     AddrBlock                        serverHint;                    /*  --> try this ADAP server first */
  787. };
  788.  
  789. typedef struct SMSAMPasswordChange SMSAMPasswordChange;
  790.  
  791. /* kSMSAMGetDynamicFwdrParams */
  792. struct SMSAMDynamicParams {
  793.     unsigned long                    curDiskUsed;                /* <--  amount of disk space used by msam */
  794.     unsigned long                    curMemoryUsed;                /* <--  amount of memory used by msam */
  795. };
  796.  
  797. typedef struct SMSAMDynamicParams SMSAMDynamicParams;
  798.  
  799. struct SMSAMAdminEPPCRequest {
  800.     SMSAMAdminCode                    adminCode;
  801.     union {
  802.         SMSAMSetupChange                setupChange;
  803.         SMSAMNameChange                    nameChange;
  804.         SMSAMPasswordChange                passwordChange;
  805.         SMSAMDynamicParams                dynamicParams;
  806.     } u;
  807. };
  808.  
  809. typedef struct SMSAMAdminEPPCRequest SMSAMAdminEPPCRequest;
  810.  
  811. struct SMSAMSetupPB {
  812.     Ptr                                qLink;
  813.     long                            reservedH1;
  814.     long                            reservedH2;
  815.     MSAMIOCompletionUPP                ioCompletion;
  816.     OSErr                            ioResult;
  817.     long                            saveA5;
  818.     short                            reqCode;
  819.     RecordIDPtr                        serverMSAM;
  820.     RStringPtr                        password;
  821.     OSType                            gatewayType;
  822.     RStringPtr                        gatewayTypeDescription;
  823.     AddrBlock                        catalogServerHint;
  824. };
  825.  
  826. typedef struct SMSAMSetupPB SMSAMSetupPB;
  827.  
  828. struct SMSAMStartupPB {
  829.     Ptr                                qLink;
  830.     long                            reservedH1;
  831.     long                            reservedH2;
  832.     MSAMIOCompletionUPP                ioCompletion;
  833.     OSErr                            ioResult;
  834.     long                            saveA5;
  835.     short                            reqCode;
  836.     AuthIdentity                    msamIdentity;
  837.     MSAMQueueRef                    queueRef;
  838. };
  839.  
  840. typedef struct SMSAMStartupPB SMSAMStartupPB;
  841.  
  842. struct SMSAMShutdownPB {
  843.     Ptr                                qLink;
  844.     long                            reservedH1;
  845.     long                            reservedH2;
  846.     MSAMIOCompletionUPP                ioCompletion;
  847.     OSErr                            ioResult;
  848.     long                            saveA5;
  849.     short                            reqCode;
  850.     MSAMQueueRef                    queueRef;
  851. };
  852.  
  853. typedef struct SMSAMShutdownPB SMSAMShutdownPB;
  854.  
  855. /****************************************************************************************/
  856. /* Definitions for reading and writing MSAM Letters */
  857. /****************************************************************************************/
  858. struct MSAMEnumeratePB {
  859.     Ptr                                qLink;
  860.     long                            reservedH1;
  861.     long                            reservedH2;
  862.     MSAMIOCompletionUPP                ioCompletion;
  863.     OSErr                            ioResult;
  864.     long                            saveA5;
  865.     short                            reqCode;
  866.     MSAMQueueRef                    queueRef;
  867.     long                            startSeqNum;
  868.     long                            nextSeqNum;
  869. /* buffer contains a Mail Reply. Each tuple is a 
  870.     MSAMEnumerateInQReply when enumerating the inQueue
  871.     MSAMEnumerateOutQReply when enumerating the outQueue */
  872.     MailBuffer                        buffer;
  873. };
  874.  
  875. typedef struct MSAMEnumeratePB MSAMEnumeratePB;
  876.  
  877. struct MSAMEnumerateInQReply {
  878.     long                            seqNum;
  879.     Boolean                            msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  880.     Boolean                            msgUpdated;                    /* true if MsgSummary has been updated by TB */
  881.     Boolean                            msgCached;                    /* true if msg is in the incoming queue */
  882.     Byte                            padByte;
  883. };
  884.  
  885. typedef struct MSAMEnumerateInQReply MSAMEnumerateInQReply;
  886.  
  887. struct MSAMEnumerateOutQReply {
  888.     long                            seqNum;
  889.     Boolean                            done;                        /* true if all responsible recipients have been processed */
  890.     IPMPriority                        priority;
  891.     OSType                            msgFamily;
  892.     long                            approxSize;
  893.     Boolean                            tunnelForm;                    /* true if this letter has to be tunnelled */
  894.     Byte                            padByte;
  895.     NetworkSpec                        nextHop;                    /* valid if tunnelForm is true */
  896.     OCECreatorType                    msgType;
  897. };
  898.  
  899. typedef struct MSAMEnumerateOutQReply MSAMEnumerateOutQReply;
  900.  
  901. struct MSAMDeletePB {
  902.     Ptr                                qLink;
  903.     long                            reservedH1;
  904.     long                            reservedH2;
  905.     MSAMIOCompletionUPP                ioCompletion;
  906.     OSErr                            ioResult;
  907.     long                            saveA5;
  908.     short                            reqCode;
  909.     MSAMQueueRef                    queueRef;
  910.     long                            seqNum;
  911.     Boolean                            msgOnly;                    /* only valid for PMSAM & inQueue */
  912. /* set true to delete message but not msgSummary */
  913.     Byte                            padByte;
  914. /* only valid for SMSAM & tunnelled messages */
  915.     OSErr                            result;
  916. };
  917.  
  918. typedef struct MSAMDeletePB MSAMDeletePB;
  919.  
  920. struct MSAMOpenPB {
  921.     Ptr                                qLink;
  922.     long                            reservedH1;
  923.     long                            reservedH2;
  924.     MSAMIOCompletionUPP                ioCompletion;
  925.     OSErr                            ioResult;
  926.     long                            saveA5;
  927.     short                            reqCode;
  928.     MSAMQueueRef                    queueRef;
  929.     long                            seqNum;
  930.     MailMsgRef                        mailMsgRef;
  931. };
  932.  
  933. typedef struct MSAMOpenPB MSAMOpenPB;
  934.  
  935. struct MSAMOpenNestedPB {
  936.     Ptr                                qLink;
  937.     long                            reservedH1;
  938.     long                            reservedH2;
  939.     MSAMIOCompletionUPP                ioCompletion;
  940.     OSErr                            ioResult;
  941.     long                            saveA5;
  942.     short                            reqCode;
  943.     MailMsgRef                        mailMsgRef;
  944.     MailMsgRef                        nestedRef;
  945. };
  946.  
  947. typedef struct MSAMOpenNestedPB MSAMOpenNestedPB;
  948.  
  949. struct MSAMClosePB {
  950.     Ptr                                qLink;
  951.     long                            reservedH1;
  952.     long                            reservedH2;
  953.     MSAMIOCompletionUPP                ioCompletion;
  954.     OSErr                            ioResult;
  955.     long                            saveA5;
  956.     short                            reqCode;
  957.     MailMsgRef                        mailMsgRef;
  958. };
  959.  
  960. typedef struct MSAMClosePB MSAMClosePB;
  961.  
  962. struct MSAMGetMsgHeaderPB {
  963.     Ptr                                qLink;
  964.     long                            reservedH1;
  965.     long                            reservedH2;
  966.     MSAMIOCompletionUPP                ioCompletion;
  967.     OSErr                            ioResult;
  968.     long                            saveA5;
  969.     short                            reqCode;
  970.     MailMsgRef                        mailMsgRef;
  971.     IPMHeaderSelector                selector;
  972.     Boolean                            filler1;
  973.     unsigned long                    offset;
  974.     MailBuffer                        buffer;
  975.     unsigned long                    remaining;
  976. };
  977.  
  978. typedef struct MSAMGetMsgHeaderPB MSAMGetMsgHeaderPB;
  979.  
  980. struct MSAMGetAttributesPB {
  981.     Ptr                                qLink;
  982.     long                            reservedH1;
  983.     long                            reservedH2;
  984.     MSAMIOCompletionUPP                ioCompletion;
  985.     OSErr                            ioResult;
  986.     long                            saveA5;
  987.     short                            reqCode;
  988.     MailMsgRef                        mailMsgRef;
  989.     MailAttributeBitmap                requestMask;                /* kMailIndicationsBit thru kMailSubjectBit */
  990.     MailBuffer                        buffer;
  991. /*    buffer returned will contain the attribute values of 
  992.         the attributes indicated in responseMask, 
  993.         from the attribute indicated by the least significant bit set
  994.         to the attribute indicated by the most significant bit set.
  995.         Note that recipients - from, to, cc, bcc cannot be read using
  996.         this call. Use GetRecipients to read these. */
  997.     MailAttributeBitmap                responseMask;
  998.     Boolean                            more;
  999.     Boolean                            filler1;
  1000. };
  1001.  
  1002. typedef struct MSAMGetAttributesPB MSAMGetAttributesPB;
  1003.  
  1004. /* attrID value to get resolved recipient list */
  1005.  
  1006. enum {
  1007.     kMailResolvedList            = 0
  1008. };
  1009.  
  1010. struct MailOriginalRecipient {
  1011.     short                            index;
  1012. };
  1013.  
  1014. /* Followed by OCEPackedRecipient */
  1015. typedef struct MailOriginalRecipient MailOriginalRecipient;
  1016.  
  1017. struct MailResolvedRecipient {
  1018.     short                            index;
  1019.     short                            recipientFlags;
  1020.     Boolean                            responsible;
  1021.     Byte                            padByte;
  1022. };
  1023.  
  1024. /* Followed by OCEPackedRecipient */
  1025. typedef struct MailResolvedRecipient MailResolvedRecipient;
  1026.  
  1027. struct MSAMGetRecipientsPB {
  1028.     Ptr                                qLink;
  1029.     long                            reservedH1;
  1030.     long                            reservedH2;
  1031.     MSAMIOCompletionUPP                ioCompletion;
  1032.     OSErr                            ioResult;
  1033.     long                            saveA5;
  1034.     short                            reqCode;
  1035.     MailMsgRef                        mailMsgRef;
  1036.     MailAttributeID                    attrID;                        /* kMailFromBit thru kMailBccBit */
  1037.     unsigned short                    startIndex;                    /* starts at 1 */
  1038.     MailBuffer                        buffer;
  1039. /*     buffer contains a Mail Reply. Each tuple is a
  1040.         MailOriginalRecipient if getting original recipients 
  1041.                                 ie the attrID is kMail[From, To, Cc, Bcc]Bit
  1042.         MailResolvedRecipient if getting resolved reicpients
  1043.                                 ie the attrID is kMailResolvedList
  1044.         Both tuples are word alligned.  */
  1045.     unsigned short                    nextIndex;
  1046.     Boolean                            more;
  1047.     Boolean                            filler1;
  1048. };
  1049.  
  1050. typedef struct MSAMGetRecipientsPB MSAMGetRecipientsPB;
  1051.  
  1052. struct MSAMGetContentPB {
  1053.     Ptr                                qLink;
  1054.     long                            reservedH1;
  1055.     long                            reservedH2;
  1056.     MSAMIOCompletionUPP                ioCompletion;
  1057.     OSErr                            ioResult;
  1058.     long                            saveA5;
  1059.     short                            reqCode;
  1060.     MailMsgRef                        mailMsgRef;
  1061.     MailSegmentMask                    segmentMask;
  1062.     MailBuffer                        buffer;
  1063.     StScrpRec                        *textScrap;
  1064.     ScriptCode                        script;
  1065.     MailSegmentType                    segmentType;
  1066.     Boolean                            endOfScript;
  1067.     Boolean                            endOfSegment;
  1068.     Boolean                            endOfContent;
  1069.     Boolean                            filler1;
  1070.     long                            segmentLength;                /* NEW: <-  valid first call in a segment */
  1071.     long                            segmentID;                    /* NEW: <-> identifier for this segment */
  1072. };
  1073.  
  1074. typedef struct MSAMGetContentPB MSAMGetContentPB;
  1075.  
  1076. struct MSAMGetEnclosurePB {
  1077.     Ptr                                qLink;
  1078.     long                            reservedH1;
  1079.     long                            reservedH2;
  1080.     MSAMIOCompletionUPP                ioCompletion;
  1081.     OSErr                            ioResult;
  1082.     long                            saveA5;
  1083.     short                            reqCode;
  1084.     MailMsgRef                        mailMsgRef;
  1085.     Boolean                            contentEnclosure;
  1086.     Byte                            padByte;
  1087.     MailBuffer                        buffer;
  1088.     Boolean                            endOfFile;
  1089.     Boolean                            endOfEnclosures;
  1090. };
  1091.  
  1092. typedef struct MSAMGetEnclosurePB MSAMGetEnclosurePB;
  1093.  
  1094. struct MailBlockInfo {
  1095.     OCECreatorType                    blockType;
  1096.     unsigned long                    offset;
  1097.     unsigned long                    blockLength;
  1098. };
  1099.  
  1100. typedef struct MailBlockInfo MailBlockInfo;
  1101.  
  1102. struct MSAMEnumerateBlocksPB {
  1103.     Ptr                                qLink;
  1104.     long                            reservedH1;
  1105.     long                            reservedH2;
  1106.     MSAMIOCompletionUPP                ioCompletion;
  1107.     OSErr                            ioResult;
  1108.     long                            saveA5;
  1109.     short                            reqCode;
  1110.     MailMsgRef                        mailMsgRef;
  1111.     unsigned short                    startIndex;                    /* starts at 1 */
  1112.     MailBuffer                        buffer;
  1113. /*     buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  1114.     unsigned short                    nextIndex;
  1115.     Boolean                            more;
  1116.     Boolean                            filler1;
  1117. };
  1118.  
  1119. typedef struct MSAMEnumerateBlocksPB MSAMEnumerateBlocksPB;
  1120.  
  1121. struct MSAMGetBlockPB {
  1122.     Ptr                                qLink;
  1123.     long                            reservedH1;
  1124.     long                            reservedH2;
  1125.     MSAMIOCompletionUPP                ioCompletion;
  1126.     OSErr                            ioResult;
  1127.     long                            saveA5;
  1128.     short                            reqCode;
  1129.     MailMsgRef                        mailMsgRef;
  1130.     OCECreatorType                    blockType;
  1131.     unsigned short                    blockIndex;
  1132.     MailBuffer                        buffer;
  1133.     unsigned long                    dataOffset;
  1134.     Boolean                            endOfBlock;
  1135.     Byte                            padByte;
  1136.     unsigned long                    remaining;
  1137. };
  1138.  
  1139. typedef struct MSAMGetBlockPB MSAMGetBlockPB;
  1140.  
  1141. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1142.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1143.  * REASONS.
  1144. */
  1145. /* not valid for tunnel form letters */
  1146. struct MSAMMarkRecipientsPB {
  1147.     Ptr                                qLink;
  1148.     long                            reservedH1;
  1149.     long                            reservedH2;
  1150.     MSAMIOCompletionUPP                ioCompletion;
  1151.     OSErr                            ioResult;
  1152.     long                            saveA5;
  1153.     short                            reqCode;
  1154.     MSAMQueueRef                    queueRef;
  1155.     long                            seqNum;
  1156. /*     buffer contains a Mail Reply. Each tuple is an unsigned short,
  1157.         the index of a recipient to be marked. */
  1158.     MailBuffer                        buffer;
  1159. };
  1160.  
  1161. typedef struct MSAMMarkRecipientsPB MSAMMarkRecipientsPB;
  1162.  
  1163. /* 
  1164.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1165.  * queueRef, seqNum 
  1166. */
  1167. /* not valid for tunnel form letters */
  1168. struct MSAMnMarkRecipientsPB {
  1169.     Ptr                                qLink;
  1170.     long                            reservedH1;
  1171.     long                            reservedH2;
  1172.     MSAMIOCompletionUPP                ioCompletion;
  1173.     OSErr                            ioResult;
  1174.     long                            saveA5;
  1175.     short                            reqCode;
  1176.     MailMsgRef                        mailMsgRef;
  1177. /*     buffer contains a Mail Reply. Each tuple is an unsigned short,
  1178.         the index of a recipient to be marked. */
  1179.     MailBuffer                        buffer;
  1180. };
  1181.  
  1182. typedef struct MSAMnMarkRecipientsPB MSAMnMarkRecipientsPB;
  1183.  
  1184. /****************************************************************************************/
  1185. struct MSAMCreatePB {
  1186.     Ptr                                qLink;
  1187.     long                            reservedH1;
  1188.     long                            reservedH2;
  1189.     MSAMIOCompletionUPP                ioCompletion;
  1190.     OSErr                            ioResult;
  1191.     long                            saveA5;
  1192.     short                            reqCode;
  1193.     MSAMQueueRef                    queueRef;
  1194.     Boolean                            asLetter;                    /* indicate if we should create as letter or msg */
  1195.     Boolean                            filler1;
  1196.     IPMMsgType                        msgType;                    /* up to application discretion: must be of IPMSenderTag
  1197.                                            kIPMOSFormatType for asLetter=true */
  1198.     long                            refCon;                        /* for messages only */
  1199.     long                            seqNum;                        /* set if creating message in the inQueue */
  1200.     Boolean                            tunnelForm;                    /* if true tunnelForm else newForm */
  1201.     Boolean                            bccRecipients;                /* true if creating letter with bcc recipients */
  1202.     MailMsgRef                        newRef;
  1203. };
  1204.  
  1205. typedef struct MSAMCreatePB MSAMCreatePB;
  1206.  
  1207. struct MSAMBeginNestedPB {
  1208.     Ptr                                qLink;
  1209.     long                            reservedH1;
  1210.     long                            reservedH2;
  1211.     MSAMIOCompletionUPP                ioCompletion;
  1212.     OSErr                            ioResult;
  1213.     long                            saveA5;
  1214.     short                            reqCode;
  1215.     MailMsgRef                        mailMsgRef;
  1216.     long                            refCon;                        /* for messages only */
  1217.     IPMMsgType                        msgType;
  1218. };
  1219.  
  1220. typedef struct MSAMBeginNestedPB MSAMBeginNestedPB;
  1221.  
  1222. struct MSAMEndNestedPB {
  1223.     Ptr                                qLink;
  1224.     long                            reservedH1;
  1225.     long                            reservedH2;
  1226.     MSAMIOCompletionUPP                ioCompletion;
  1227.     OSErr                            ioResult;
  1228.     long                            saveA5;
  1229.     short                            reqCode;
  1230.     MailMsgRef                        mailMsgRef;
  1231. };
  1232.  
  1233. typedef struct MSAMEndNestedPB MSAMEndNestedPB;
  1234.  
  1235. struct MSAMSubmitPB {
  1236.     Ptr                                qLink;
  1237.     long                            reservedH1;
  1238.     long                            reservedH2;
  1239.     MSAMIOCompletionUPP                ioCompletion;
  1240.     OSErr                            ioResult;
  1241.     long                            saveA5;
  1242.     short                            reqCode;
  1243.     MailMsgRef                        mailMsgRef;
  1244.     Boolean                            submitFlag;
  1245.     Byte                            padByte;
  1246.     MailLetterID                    msgID;
  1247. };
  1248.  
  1249. typedef struct MSAMSubmitPB MSAMSubmitPB;
  1250.  
  1251. struct MSAMPutMsgHeaderPB {
  1252.     Ptr                                qLink;
  1253.     long                            reservedH1;
  1254.     long                            reservedH2;
  1255.     MSAMIOCompletionUPP                ioCompletion;
  1256.     OSErr                            ioResult;
  1257.     long                            saveA5;
  1258.     short                            reqCode;
  1259.     MailMsgRef                        mailMsgRef;
  1260.     OCERecipient                    *replyQueue;
  1261.     IPMSender                        *sender;
  1262.     IPMNotificationType                deliveryNotification;
  1263.     IPMPriority                        priority;
  1264. };
  1265.  
  1266. typedef struct MSAMPutMsgHeaderPB MSAMPutMsgHeaderPB;
  1267.  
  1268. struct MSAMPutAttributePB {
  1269.     Ptr                                qLink;
  1270.     long                            reservedH1;
  1271.     long                            reservedH2;
  1272.     MSAMIOCompletionUPP                ioCompletion;
  1273.     OSErr                            ioResult;
  1274.     long                            saveA5;
  1275.     short                            reqCode;
  1276.     MailMsgRef                        mailMsgRef;
  1277.     MailAttributeID                    attrID;                        /* kMailIndicationsBit thru kMailSubjectBit */
  1278.     MailBuffer                        buffer;
  1279. };
  1280.  
  1281. typedef struct MSAMPutAttributePB MSAMPutAttributePB;
  1282.  
  1283. struct MSAMPutRecipientPB {
  1284.     Ptr                                qLink;
  1285.     long                            reservedH1;
  1286.     long                            reservedH2;
  1287.     MSAMIOCompletionUPP                ioCompletion;
  1288.     OSErr                            ioResult;
  1289.     long                            saveA5;
  1290.     short                            reqCode;
  1291.     MailMsgRef                        mailMsgRef;
  1292.     MailAttributeID                    attrID;                        /* kMailFromBit thru kMailBccBit */
  1293.     MailRecipient                    *recipient;
  1294.     Boolean                            responsible;                /* valid for server and message msams only */
  1295.     Boolean                            filler1;
  1296. };
  1297.  
  1298. typedef struct MSAMPutRecipientPB MSAMPutRecipientPB;
  1299.  
  1300. struct MSAMPutContentPB {
  1301.     Ptr                                qLink;
  1302.     long                            reservedH1;
  1303.     long                            reservedH2;
  1304.     MSAMIOCompletionUPP                ioCompletion;
  1305.     OSErr                            ioResult;
  1306.     long                            saveA5;
  1307.     short                            reqCode;
  1308.     MailMsgRef                        mailMsgRef;
  1309.     MailSegmentType                    segmentType;
  1310.     Boolean                            append;
  1311.     Byte                            padByte;
  1312.     MailBuffer                        buffer;
  1313.     StScrpRec                        *textScrap;
  1314.     Boolean                            startNewScript;
  1315.     Boolean                            filler1;
  1316.     ScriptCode                        script;                        /* valid only if startNewScript is true */
  1317. };
  1318.  
  1319. typedef struct MSAMPutContentPB MSAMPutContentPB;
  1320.  
  1321. struct MSAMPutEnclosurePB {
  1322.     Ptr                                qLink;
  1323.     long                            reservedH1;
  1324.     long                            reservedH2;
  1325.     MSAMIOCompletionUPP                ioCompletion;
  1326.     OSErr                            ioResult;
  1327.     long                            saveA5;
  1328.     short                            reqCode;
  1329.     MailMsgRef                        mailMsgRef;
  1330.     Boolean                            contentEnclosure;
  1331.     Byte                            padByte;
  1332.     Boolean                            hfs;                        /* true => in file system, false => in memory */
  1333.     Boolean                            append;
  1334.     MailBuffer                        buffer;                        /* Unused if hfs == true */
  1335.     FSSpec                            enclosure;
  1336.     MailEnclosureInfo                addlInfo;
  1337. };
  1338.  
  1339. typedef struct MSAMPutEnclosurePB MSAMPutEnclosurePB;
  1340.  
  1341. struct MSAMPutBlockPB {
  1342.     Ptr                                qLink;
  1343.     long                            reservedH1;
  1344.     long                            reservedH2;
  1345.     MSAMIOCompletionUPP                ioCompletion;
  1346.     OSErr                            ioResult;
  1347.     long                            saveA5;
  1348.     short                            reqCode;
  1349.     MailMsgRef                        mailMsgRef;
  1350.     long                            refCon;                        /* for messages only */
  1351.     OCECreatorType                    blockType;
  1352.     Boolean                            append;
  1353.     Boolean                            filler1;
  1354.     MailBuffer                        buffer;
  1355.     MailBlockMode                    mode;                        /* if blockType is kMailTunnelLtrType or kMailHopInfoType
  1356.                                        mode is assumed to be kMailFromMark */
  1357.     unsigned long                    offset;
  1358. };
  1359.  
  1360. typedef struct MSAMPutBlockPB MSAMPutBlockPB;
  1361.  
  1362. /****************************************************************************************/
  1363. struct MSAMCreateReportPB {
  1364.     Ptr                                qLink;
  1365.     long                            reservedH1;
  1366.     long                            reservedH2;
  1367.     MSAMIOCompletionUPP                ioCompletion;
  1368.     OSErr                            ioResult;
  1369.     long                            saveA5;
  1370.     short                            reqCode;
  1371.     MSAMQueueRef                    queueRef;                    /* to distinguish personal and server MSAMs */
  1372.     MailMsgRef                        mailMsgRef;
  1373.     MailLetterID                    msgID;                        /* kMailLetterIDBit of letter being reported upon */
  1374.     MailRecipient                    *sender;                    /* sender of the letter you are creating report on */
  1375. };
  1376.  
  1377. typedef struct MSAMCreateReportPB MSAMCreateReportPB;
  1378.  
  1379. struct MSAMPutRecipientReportPB {
  1380.     Ptr                                qLink;
  1381.     long                            reservedH1;
  1382.     long                            reservedH2;
  1383.     MSAMIOCompletionUPP                ioCompletion;
  1384.     OSErr                            ioResult;
  1385.     long                            saveA5;
  1386.     short                            reqCode;
  1387.     MailMsgRef                        mailMsgRef;
  1388.     short                            recipientIndex;                /* recipient index in the original letter */
  1389.     OSErr                            result;                        /* result of sending the recipient */
  1390. };
  1391.  
  1392. typedef struct MSAMPutRecipientReportPB MSAMPutRecipientReportPB;
  1393.  
  1394. /****************************************************************************************/
  1395. struct MailWakeupPMSAMPB {
  1396.     Ptr                                qLink;
  1397.     long                            reservedH1;
  1398.     long                            reservedH2;
  1399.     MSAMIOCompletionUPP                ioCompletion;
  1400.     OSErr                            ioResult;
  1401.     long                            saveA5;
  1402.     short                            reqCode;
  1403.     CreationID                        pmsamCID;
  1404.     MailSlotID                        mailSlotID;
  1405. };
  1406.  
  1407. typedef struct MailWakeupPMSAMPB MailWakeupPMSAMPB;
  1408.  
  1409. struct MailCreateMailSlotPB {
  1410.     Ptr                                qLink;
  1411.     long                            reservedH1;
  1412.     long                            reservedH2;
  1413.     MSAMIOCompletionUPP                ioCompletion;
  1414.     OSErr                            ioResult;
  1415.     long                            saveA5;
  1416.     short                            reqCode;
  1417.     MailboxRef                        mailboxRef;
  1418.     long                            timeout;
  1419.     CreationID                        pmsamCID;
  1420.     SMCA                            smca;
  1421. };
  1422.  
  1423. typedef struct MailCreateMailSlotPB MailCreateMailSlotPB;
  1424.  
  1425. struct MailModifyMailSlotPB {
  1426.     Ptr                                qLink;
  1427.     long                            reservedH1;
  1428.     long                            reservedH2;
  1429.     MSAMIOCompletionUPP                ioCompletion;
  1430.     OSErr                            ioResult;
  1431.     long                            saveA5;
  1432.     short                            reqCode;
  1433.     MailboxRef                        mailboxRef;
  1434.     long                            timeout;
  1435.     CreationID                        pmsamCID;
  1436.     SMCA                            smca;
  1437. };
  1438.  
  1439. typedef struct MailModifyMailSlotPB MailModifyMailSlotPB;
  1440.  
  1441. /****************************************************************************************/
  1442.  
  1443. enum {
  1444.     kPMSAMGetMSAMRecord            = 1286,
  1445.     kPMSAMOpenQueues            = 1280,
  1446.     kPMSAMLogError                = 1313,
  1447.     kPMSAMSetStatus                = 1319,
  1448.     kPMSAMCreateMsgSummary        = 1314,
  1449.     kPMSAMPutMsgSummary            = 1317,
  1450.     kPMSAMGetMsgSummary            = 1318,
  1451.     kMailWakeupPMSAM            = 1287,
  1452.     kSMSAMSetup                    = 1315,
  1453.     kSMSAMStartup                = 1281,
  1454.     kSMSAMShutdown                = 1282,
  1455.     kMSAMEnumerate                = 1283,
  1456.     kMSAMDelete                    = 1284,
  1457.     kMSAMOpen                    = 1288,
  1458.     kMSAMOpenNested                = 1289,
  1459.     kMSAMClose                    = 1290,
  1460.     kMSAMGetMsgHeader            = 1297,
  1461.     kMSAMnMarkRecipients        = 1298,
  1462.     kMSAMGetAttributes            = 1291,
  1463.     kMSAMGetRecipients            = 1292,
  1464.     kMSAMGetContent                = 1293,
  1465.     kMSAMGetEnclosure            = 1294,
  1466.     kMSAMEnumerateBlocks        = 1295,
  1467.     kMSAMGetBlock                = 1296,
  1468.     kMSAMMarkRecipients            = 1285,
  1469.     kMSAMCreate                    = 1300,
  1470.     kMSAMBeginNested            = 1301,
  1471.     kMSAMEndNested                = 1302,
  1472.     kMSAMSubmit                    = 1303,
  1473.     kMSAMPutMsgHeader            = 1309,
  1474.     kMSAMPutAttribute            = 1304,
  1475.     kMSAMPutRecipient            = 1305,
  1476.     kMSAMPutContent                = 1306,
  1477.     kMSAMPutEnclosure            = 1307,
  1478.     kMSAMPutBlock                = 1308,
  1479.     kMSAMCreateReport            = 1311,
  1480.     kMSAMPutRecipientReport        = 1312,
  1481.     kMailCreateMailSlot            = 1323,
  1482.     kMailModifyMailSlot            = 1324
  1483. };
  1484.  
  1485. union MSAMParam {
  1486.     struct {
  1487.         Ptr                                qLink;
  1488.         long                            reservedH1;
  1489.         long                            reservedH2;
  1490.         MSAMIOCompletionUPP                ioCompletion;
  1491.         OSErr                            ioResult;
  1492.         long                            saveA5;
  1493.         short                            reqCode;
  1494.     }                                header;
  1495.     PMSAMGetMSAMRecordPB            pmsamGetMSAMRecord;
  1496.     PMSAMOpenQueuesPB                pmsamOpenQueues;
  1497.     PMSAMSetStatusPB                pmsamSetStatus;
  1498.     PMSAMLogErrorPB                    pmsamLogError;
  1499.     SMSAMSetupPB                    smsamSetup;
  1500.     SMSAMStartupPB                    smsamStartup;
  1501.     SMSAMShutdownPB                    smsamShutdown;
  1502.     MSAMEnumeratePB                    msamEnumerate;
  1503.     MSAMDeletePB                    msamDelete;
  1504.     MSAMOpenPB                        msamOpen;
  1505.     MSAMOpenNestedPB                msamOpenNested;
  1506.     MSAMClosePB                        msamClose;
  1507.     MSAMGetMsgHeaderPB                msamGetMsgHeader;
  1508.     MSAMGetAttributesPB                msamGetAttributes;
  1509.     MSAMGetRecipientsPB                msamGetRecipients;
  1510.     MSAMGetContentPB                msamGetContent;
  1511.     MSAMGetEnclosurePB                msamGetEnclosure;
  1512.     MSAMEnumerateBlocksPB            msamEnumerateBlocks;
  1513.     MSAMGetBlockPB                    msamGetBlock;
  1514.     MSAMMarkRecipientsPB            msamMarkRecipients;
  1515.     MSAMnMarkRecipientsPB            msamnMarkRecipients;
  1516.     MSAMCreatePB                    msamCreate;
  1517.     MSAMBeginNestedPB                msamBeginNested;
  1518.     MSAMEndNestedPB                    msamEndNested;
  1519.     MSAMSubmitPB                    msamSubmit;
  1520.     MSAMPutMsgHeaderPB                msamPutMsgHeader;
  1521.     MSAMPutAttributePB                msamPutAttribute;
  1522.     MSAMPutRecipientPB                msamPutRecipient;
  1523.     MSAMPutContentPB                msamPutContent;
  1524.     MSAMPutEnclosurePB                msamPutEnclosure;
  1525.     MSAMPutBlockPB                    msamPutBlock;
  1526.     MSAMCreateReportPB                msamCreateReport;            /* Reports and Error Handling Calls */
  1527.     MSAMPutRecipientReportPB        msamPutRecipientReport;
  1528.     PMSAMCreateMsgSummaryPB            pmsamCreateMsgSummary;
  1529.     PMSAMPutMsgSummaryPB            pmsamPutMsgSummary;
  1530.     PMSAMGetMsgSummaryPB            pmsamGetMsgSummary;
  1531.     MailWakeupPMSAMPB                wakeupPMSAM;
  1532.     MailCreateMailSlotPB            createMailSlot;
  1533.     MailModifyMailSlotPB            modifyMailSlot;
  1534. };
  1535. enum {
  1536.     uppMSAMIOCompletionProcInfo = kPascalStackBased
  1537.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MSAMParam*)))
  1538. };
  1539.  
  1540. #if GENERATINGCFM
  1541. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)        \
  1542.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
  1543. #else
  1544. #define CallMSAMIOCompletionProc(userRoutine, paramBlock)        \
  1545.         (*(userRoutine))((paramBlock))
  1546. #endif
  1547.  
  1548. #if GENERATINGCFM
  1549. #define NewMSAMIOCompletionProc(userRoutine)        \
  1550.         (MSAMIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
  1551. #else
  1552. #define NewMSAMIOCompletionProc(userRoutine)        \
  1553.         ((MSAMIOCompletionUPP) (userRoutine))
  1554. #endif
  1555.  
  1556. extern pascal OSErr MailCreateMailSlot(MSAMParam *paramBlock)
  1557.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1323, 0xAA5E);
  1558. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1559. extern pascal OSErr MailModifyMailSlot(MSAMParam *paramBlock)
  1560.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1324, 0xAA5E);
  1561. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1562. extern pascal OSErr MailWakeupPMSAM(MSAMParam *paramBlock)
  1563.  FIVEWORDINLINE(0x7001, 0x1f00, 0x3f3c, 1287, 0xAA5E);
  1564. /* Personal MSAM Glue Routines */
  1565. extern pascal OSErr PMSAMOpenQueues(MSAMParam *paramBlock)
  1566.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1280, 0xAA5E);
  1567. extern pascal OSErr PMSAMSetStatus(MSAMParam *paramBlock, Boolean asyncFlag)
  1568.  THREEWORDINLINE(0x3f3c, 1319, 0xAA5E);
  1569. /* SYNC ONLY */
  1570. extern pascal OSErr PMSAMGetMSAMRecord(MSAMParam *paramBlock)
  1571.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1286, 0xAA5E);
  1572. /* Server MSAM Glue Routines */
  1573. /* SYNC ONLY */
  1574. extern pascal OSErr SMSAMSetup(MSAMParam *paramBlock)
  1575.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1315, 0xAA5E);
  1576. /* SYNC ONLY */
  1577. extern pascal OSErr SMSAMStartup(MSAMParam *paramBlock)
  1578.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1281, 0xAA5E);
  1579. extern pascal OSErr SMSAMShutdown(MSAMParam *paramBlock, Boolean asyncFlag)
  1580.  THREEWORDINLINE(0x3f3c, 1282, 0xAA5E);
  1581. /* Get Interface Glue Routines */
  1582. extern pascal OSErr MSAMEnumerate(MSAMParam *paramBlock, Boolean asyncFlag)
  1583.  THREEWORDINLINE(0x3f3c, 1283, 0xAA5E);
  1584. extern pascal OSErr MSAMDelete(MSAMParam *paramBlock, Boolean asyncFlag)
  1585.  THREEWORDINLINE(0x3f3c, 1284, 0xAA5E);
  1586. extern pascal OSErr MSAMMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1587.  THREEWORDINLINE(0x3f3c, 1285, 0xAA5E);
  1588. extern pascal OSErr MSAMnMarkRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1589.  THREEWORDINLINE(0x3f3c, 1298, 0xAA5E);
  1590. extern pascal OSErr MSAMOpen(MSAMParam *paramBlock, Boolean asyncFlag)
  1591.  THREEWORDINLINE(0x3f3c, 1288, 0xAA5E);
  1592. extern pascal OSErr MSAMOpenNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1593.  THREEWORDINLINE(0x3f3c, 1289, 0xAA5E);
  1594. extern pascal OSErr MSAMClose(MSAMParam *paramBlock, Boolean asyncFlag)
  1595.  THREEWORDINLINE(0x3f3c, 1290, 0xAA5E);
  1596. extern pascal OSErr MSAMGetRecipients(MSAMParam *paramBlock, Boolean asyncFlag)
  1597.  THREEWORDINLINE(0x3f3c, 1292, 0xAA5E);
  1598. extern pascal OSErr MSAMGetAttributes(MSAMParam *paramBlock, Boolean asyncFlag)
  1599.  THREEWORDINLINE(0x3f3c, 1291, 0xAA5E);
  1600. extern pascal OSErr MSAMGetContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1601.  THREEWORDINLINE(0x3f3c, 1293, 0xAA5E);
  1602. extern pascal OSErr MSAMGetEnclosure(MSAMParam *paramBlock, Boolean asyncFlag)
  1603.  THREEWORDINLINE(0x3f3c, 1294, 0xAA5E);
  1604. extern pascal OSErr MSAMEnumerateBlocks(MSAMParam *paramBlock, Boolean asyncFlag)
  1605.  THREEWORDINLINE(0x3f3c, 1295, 0xAA5E);
  1606. extern pascal OSErr MSAMGetBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1607.  THREEWORDINLINE(0x3f3c, 1296, 0xAA5E);
  1608. extern pascal OSErr MSAMGetMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1609.  THREEWORDINLINE(0x3f3c, 1297, 0xAA5E);
  1610. /* Put Interface Glue Routines */
  1611. extern pascal OSErr MSAMCreate(MSAMParam *paramBlock, Boolean asyncFlag)
  1612.  THREEWORDINLINE(0x3f3c, 1300, 0xAA5E);
  1613. extern pascal OSErr MSAMBeginNested(MSAMParam *paramBlock, Boolean asyncFlag)
  1614.  THREEWORDINLINE(0x3f3c, 1301, 0xAA5E);
  1615. extern pascal OSErr MSAMEndNested(MSAMParam *paramBlock)
  1616.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1302, 0xAA5E);
  1617. /*  SYNCHRONOUS ONLY */
  1618. extern pascal OSErr MSAMSubmit(MSAMParam *paramBlock)
  1619.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1303, 0xAA5E);
  1620. extern pascal OSErr MSAMPutAttribute(MSAMParam *paramBlock, Boolean asyncFlag)
  1621.  THREEWORDINLINE(0x3f3c, 1304, 0xAA5E);
  1622. extern pascal OSErr MSAMPutRecipient(MSAMParam *paramBlock, Boolean asyncFlag)
  1623.  THREEWORDINLINE(0x3f3c, 1305, 0xAA5E);
  1624. extern pascal OSErr MSAMPutContent(MSAMParam *paramBlock, Boolean asyncFlag)
  1625.  THREEWORDINLINE(0x3f3c, 1306, 0xAA5E);
  1626. /*  SYNCHRONOUS ONLY */
  1627. extern pascal OSErr MSAMPutEnclosure(MSAMParam *paramBlock)
  1628.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1307, 0xAA5E);
  1629. extern pascal OSErr MSAMPutBlock(MSAMParam *paramBlock, Boolean asyncFlag)
  1630.  THREEWORDINLINE(0x3f3c, 1308, 0xAA5E);
  1631. extern pascal OSErr MSAMPutMsgHeader(MSAMParam *paramBlock, Boolean asyncFlag)
  1632.  THREEWORDINLINE(0x3f3c, 1309, 0xAA5E);
  1633. /* Reports and Error Handling Glue Routines */
  1634. extern pascal OSErr MSAMCreateReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1635.  THREEWORDINLINE(0x3f3c, 1311, 0xAA5E);
  1636. extern pascal OSErr MSAMPutRecipientReport(MSAMParam *paramBlock, Boolean asyncFlag)
  1637.  THREEWORDINLINE(0x3f3c, 1312, 0xAA5E);
  1638. extern pascal OSErr PMSAMLogError(MSAMParam *paramBlock)
  1639.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3f3c, 1313, 0xAA5E);
  1640. /* MsgSummary Glue Routines */
  1641. extern pascal OSErr PMSAMCreateMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1642.  THREEWORDINLINE(0x3f3c, 1314, 0xAA5E);
  1643. extern pascal OSErr PMSAMPutMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1644.  THREEWORDINLINE(0x3f3c, 1317, 0xAA5E);
  1645. extern pascal OSErr PMSAMGetMsgSummary(MSAMParam *paramBlock, Boolean asyncFlag)
  1646.  THREEWORDINLINE(0x3f3c, 1318, 0xAA5E);
  1647.  
  1648. #if PRAGMA_IMPORT_SUPPORTED
  1649. #pragma import off
  1650. #endif
  1651.  
  1652. #if PRAGMA_ALIGN_SUPPORTED
  1653. #pragma options align=reset
  1654. #endif
  1655.  
  1656. #ifdef __cplusplus
  1657. }
  1658. #endif
  1659.  
  1660. #endif /* __OCEMAIL__ */
  1661.